import { http } from '../../utils/request'
import type { LoginRequest } from './type'
import type { Response, UserResponse } from '../type'

export const loginApi = async (
  data: LoginRequest
): Promise<Response<UserResponse>> => {
  return await http.post<Response<UserResponse>>('/api/auth/login', data)
}
